/*
 * Copyright (c) 2010, Oracle. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * * Redistributions of source code must retain the above copyright notice,
 *   this list of conditions and the following disclaimer.
 *
 * * Redistributions in binary form must reproduce the above copyright notice,
 *   this list of conditions and the following disclaimer in the documentation
 *   and/or other materials provided with the distribution.
 *
 * * Neither the name of Oracle nor the names of its contributors
 *   may be used to endorse or promote products derived from this software without
 *   specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 * THE POSSIBILITY OF SUCH DAMAGE.
 */

package app;

import java.awt.event.*;
import java.nio.charset.Charset;
import java.sql.Connection;

import javax.swing.*;
import org.testng.Reporter;

import framework.DataBaseUtils;
import framework.Logger;

public class EnterParametersGuiForm extends JFrame {

	/**
	 * Creates new form ContactEditor
	 */
	public EnterParametersGuiForm() {
		initComponents();
	}

	/**
	 * This method is called from within the constructor to initialize the form.
	 * WARNING: Do NOT modify this code. The content of this method is always
	 * regenerated by the Form Editor.
	 */
	// <editor-fold defaultstate="collapsed" desc="Generated Code">
	private void initComponents() {

		orgDataPanel = new JPanel();
		fullNameLabel = new JLabel();
		emailLabel = new JLabel();
		fullNameTextField = new JTextField();
		emailTextField = new JTextField();
		phoneLabel = new JLabel();
		phoneTextField = new JTextField();
		ogrnLabel = new JLabel();
		ogrnTextField = new JTextField();
		innLabel = new JLabel();
		innTextField = new JTextField();
		kppLabel = new JLabel();
		kppTextField = new JTextField();
		checkOrgDataButton = new JButton();
		userDataPanel = new JPanel();
		loginLabel = new JLabel();
		firstNameLabel = new JLabel();
		loginTextField = new JTextField();
		firstNameTextField = new JTextField();
		lastNameLabel = new JLabel();
		lastNameTextField = new JTextField();
		middleNameLabel = new JLabel();
		middleNameTextField = new JTextField();
		checkUserDataButton = new JButton();
		clearFormButon = new JButton();
		cancelButton = new JButton();
		registerButton = new JButton();

		setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
		setTitle("Форма ввода данных регистрируемой организации");
		setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
		setMaximumSize(new java.awt.Dimension(710, 318));
		setPreferredSize(new java.awt.Dimension(720, 460));
		getContentPane().setLayout(
				new org.netbeans.lib.awtextra.AbsoluteLayout());

		orgDataPanel.setBorder(BorderFactory
				.createTitledBorder("Данные организации "));
		orgDataPanel.setPreferredSize(new java.awt.Dimension(700, 131));

		fullNameLabel.setText("Полное наименование");

		emailLabel.setText("Email");

		fullNameTextField.setText("My_AUTO test 01");
		fullNameTextField.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent evt) {
				fullNameTextFieldActionPerformed(evt);
			}
		});

		emailTextField.setText("testmailfz223@gmail.com");
		emailTextField.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent evt) {
				emailTextFieldActionPerformed(evt);
			}
		});

		phoneLabel.setText("Телефон");

		phoneTextField.setText("8-495-9938028");

		ogrnLabel.setText("ОГРН");

		ogrnTextField.setText("9999999999993");
		ogrnTextField.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent evt) {
				ogrnTextFieldActionPerformed(evt);
			}
		});

		innLabel.setText("ИНН");

		innTextField.setText("4444444493");
		innTextField.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent evt) {
				innTextFieldActionPerformed(evt);
			}
		});

		kppLabel.setText("КПП");

		kppTextField.setText("444444493");

		checkOrgDataButton.setText("Проверить уникальность ОГРН+ИНН+КПП");
		checkOrgDataButton.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent evt) {
				checkOrgDataButtonActionPerformed(evt);
			}
		});

		org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(
				orgDataPanel);
		orgDataPanel.setLayout(jPanel1Layout);
		jPanel1Layout
				.setHorizontalGroup(jPanel1Layout
						.createParallelGroup(
								org.jdesktop.layout.GroupLayout.LEADING)
						.add(jPanel1Layout
								.createSequentialGroup()
								.addContainerGap()
								.add(jPanel1Layout
										.createParallelGroup(
												org.jdesktop.layout.GroupLayout.TRAILING)
										.add(jPanel1Layout
												.createParallelGroup(
														org.jdesktop.layout.GroupLayout.LEADING)
												.add(fullNameLabel)
												.add(org.jdesktop.layout.GroupLayout.TRAILING,
														ogrnLabel)
												.add(org.jdesktop.layout.GroupLayout.TRAILING,
														innLabel))
										.add(kppLabel))
								.add(18, 18, 18)
								.add(jPanel1Layout
										.createParallelGroup(
												org.jdesktop.layout.GroupLayout.LEADING)
										.add(jPanel1Layout
												.createSequentialGroup()
												.add(jPanel1Layout
														.createParallelGroup(
																org.jdesktop.layout.GroupLayout.LEADING)
														.add(fullNameTextField,
																org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
																218,
																org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
														.add(org.jdesktop.layout.GroupLayout.TRAILING,
																ogrnTextField,
																org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
																218,
																org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
												.add(38, 38, 38)
												.add(emailLabel)
												.addPreferredGap(
														org.jdesktop.layout.LayoutStyle.RELATED)
												.add(jPanel1Layout
														.createParallelGroup(
																org.jdesktop.layout.GroupLayout.TRAILING,
																false)
														.add(org.jdesktop.layout.GroupLayout.LEADING,
																emailTextField,
																org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
																218,
																Short.MAX_VALUE)
														.add(checkOrgDataButton,
																org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
																218,
																Short.MAX_VALUE)))
										.add(kppTextField,
												org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
												218,
												org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
										.add(jPanel1Layout
												.createSequentialGroup()
												.add(innTextField,
														org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
														218,
														org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
												.addPreferredGap(
														org.jdesktop.layout.LayoutStyle.RELATED)
												.add(phoneLabel)
												.add(18, 18, 18)
												.add(phoneTextField,
														org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
														218,
														org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
								.addContainerGap(46, Short.MAX_VALUE)));
		jPanel1Layout
				.setVerticalGroup(jPanel1Layout
						.createParallelGroup(
								org.jdesktop.layout.GroupLayout.LEADING)
						.add(jPanel1Layout
								.createSequentialGroup()
								.add(jPanel1Layout
										.createParallelGroup(
												org.jdesktop.layout.GroupLayout.BASELINE)
										.add(fullNameLabel)
										.add(emailTextField,
												org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
												30,
												org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
										.add(fullNameTextField,
												org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
												30,
												org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
										.add(emailLabel))
								.addPreferredGap(
										org.jdesktop.layout.LayoutStyle.RELATED)
								.add(jPanel1Layout
										.createParallelGroup(
												org.jdesktop.layout.GroupLayout.BASELINE)
										.add(ogrnTextField,
												org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
												30,
												org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
										.add(ogrnLabel)
										.add(checkOrgDataButton,
												org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
												30,
												org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
								.addPreferredGap(
										org.jdesktop.layout.LayoutStyle.RELATED,
										org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
										Short.MAX_VALUE)
								.add(jPanel1Layout
										.createParallelGroup(
												org.jdesktop.layout.GroupLayout.BASELINE)
										.add(kppTextField,
												org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
												30,
												org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
										.add(kppLabel))
								.addPreferredGap(
										org.jdesktop.layout.LayoutStyle.RELATED)
								.add(jPanel1Layout
										.createParallelGroup(
												org.jdesktop.layout.GroupLayout.BASELINE)
										.add(innTextField,
												org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
												30,
												org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
										.add(innLabel)
										.add(jPanel1Layout
												.createParallelGroup(
														org.jdesktop.layout.GroupLayout.BASELINE)
												.add(phoneTextField,
														org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
														30,
														org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
												.add(phoneLabel)))
								.add(37, 37, 37)));

		getContentPane().add(
				orgDataPanel,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 11, -1,
						180));

		userDataPanel.setBorder(BorderFactory
				.createTitledBorder("Данные администратора организации "));

		loginLabel.setText("Логин");

		firstNameLabel.setText("Имя");
		firstNameLabel.setHorizontalTextPosition(SwingConstants.RIGHT);
		firstNameLabel.setInheritsPopupMenu(false);

		loginTextField.setText("223-223-223 01");
		loginTextField.setPreferredSize(new java.awt.Dimension(84, 20));
		loginTextField.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent evt) {
				loginTextFieldActionPerformed(evt);
			}
		});

		firstNameTextField.setText("Имя-Тест");
		firstNameTextField.setPreferredSize(new java.awt.Dimension(84, 20));
		firstNameTextField.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent evt) {
				firstNameTextFieldActionPerformed(evt);
			}
		});

		lastNameLabel.setText("Фамилия");

		lastNameTextField.setText("Фамилия-Тест");
		lastNameTextField.setPreferredSize(new java.awt.Dimension(84, 20));

		middleNameLabel.setLabelFor(middleNameTextField);
		middleNameLabel.setText("Отчество");
		middleNameLabel.setHorizontalTextPosition(SwingConstants.RIGHT);

		middleNameTextField.setText("Отчество-Тест");
		middleNameTextField.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent evt) {
				middleNameTextFieldActionPerformed(evt);
			}
		});

		checkUserDataButton.setText("Проверить уникальность логина");
		checkUserDataButton.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent evt) {
				checkUserDataButtonActionPerformed(evt);
			}
		});

		clearFormButon.setText("Очистить форму");
		clearFormButon.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent evt) {
				clearFormButonActionPerformed(evt);
			}
		});

		cancelButton.setText("Отмена");
		cancelButton.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent evt) {
				cancelButtonActionPerformed(evt);
			}
		});

		registerButton.setText("Зарегистрировать");
		registerButton.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent evt) {
				registerButtonActionPerformed(evt);
			}
		});

		org.jdesktop.layout.GroupLayout jPanel3Layout = new org.jdesktop.layout.GroupLayout(
				userDataPanel);
		userDataPanel.setLayout(jPanel3Layout);
		jPanel3Layout
				.setHorizontalGroup(jPanel3Layout
						.createParallelGroup(
								org.jdesktop.layout.GroupLayout.LEADING)
						.add(jPanel3Layout
								.createSequentialGroup()
								.add(91, 91, 91)
								.add(jPanel3Layout
										.createParallelGroup(
												org.jdesktop.layout.GroupLayout.TRAILING)
										.add(jPanel3Layout
												.createSequentialGroup()
												.add(registerButton)
												.add(18, 18, 18)
												.add(cancelButton)
												.add(18, 18, 18)
												.add(clearFormButon))
										.add(jPanel3Layout
												.createParallelGroup(
														org.jdesktop.layout.GroupLayout.LEADING)
												.add(jPanel3Layout
														.createSequentialGroup()
														.add(8, 8, 8)
														.add(jPanel3Layout
																.createParallelGroup(
																		org.jdesktop.layout.GroupLayout.TRAILING)
																.add(lastNameLabel)
																.add(loginLabel)
																.add(firstNameLabel,
																		org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
																		37,
																		org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
														.addPreferredGap(
																org.jdesktop.layout.LayoutStyle.RELATED)
														.add(jPanel3Layout
																.createParallelGroup(
																		org.jdesktop.layout.GroupLayout.LEADING)
																.add(jPanel3Layout
																		.createSequentialGroup()
																		.add(jPanel3Layout
																				.createParallelGroup(
																						org.jdesktop.layout.GroupLayout.LEADING)
																				.add(firstNameTextField,
																						org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
																						218,
																						org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
																				.add(middleNameTextField,
																						org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
																						218,
																						org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
																		.add(0,
																				0,
																				Short.MAX_VALUE))
																.add(jPanel3Layout
																		.createSequentialGroup()
																		.add(jPanel3Layout
																				.createParallelGroup(
																						org.jdesktop.layout.GroupLayout.LEADING,
																						false)
																				.add(loginTextField,
																						org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
																						org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
																						Short.MAX_VALUE)
																				.add(lastNameTextField,
																						org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
																						218,
																						org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
																		.addPreferredGap(
																				org.jdesktop.layout.LayoutStyle.RELATED,
																				92,
																				Short.MAX_VALUE)
																		.add(checkUserDataButton,
																				org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
																				218,
																				org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))))
												.add(middleNameLabel,
														org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
														59,
														org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
								.addContainerGap(13, Short.MAX_VALUE)));
		jPanel3Layout
				.setVerticalGroup(jPanel3Layout
						.createParallelGroup(
								org.jdesktop.layout.GroupLayout.LEADING)
						.add(jPanel3Layout
								.createSequentialGroup()
								.add(jPanel3Layout
										.createParallelGroup(
												org.jdesktop.layout.GroupLayout.BASELINE)
										.add(loginLabel)
										.add(loginTextField,
												org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
												30,
												org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
										.add(checkUserDataButton,
												org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
												30,
												org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
								.addPreferredGap(
										org.jdesktop.layout.LayoutStyle.RELATED)
								.add(jPanel3Layout
										.createParallelGroup(
												org.jdesktop.layout.GroupLayout.BASELINE)
										.add(lastNameLabel)
										.add(lastNameTextField,
												org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
												30,
												org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
								.addPreferredGap(
										org.jdesktop.layout.LayoutStyle.RELATED,
										org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
										Short.MAX_VALUE)
								.add(jPanel3Layout
										.createParallelGroup(
												org.jdesktop.layout.GroupLayout.BASELINE)
										.add(firstNameLabel)
										.add(firstNameTextField,
												org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
												30,
												org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
								.addPreferredGap(
										org.jdesktop.layout.LayoutStyle.RELATED)
								.add(jPanel3Layout
										.createParallelGroup(
												org.jdesktop.layout.GroupLayout.BASELINE)
										.add(middleNameTextField,
												org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
												30,
												org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
										.add(middleNameLabel))
								.add(18, 18, 18)
								.add(jPanel3Layout
										.createParallelGroup(
												org.jdesktop.layout.GroupLayout.BASELINE)
										.add(clearFormButon,
												org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
												30,
												org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
										.add(cancelButton,
												org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
												30,
												org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
										.add(registerButton,
												org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
												30,
												org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
								.add(46, 46, 46)));

		getContentPane().add(
				userDataPanel,
				new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 200, 700,
						230));

		getAccessibleContext().setAccessibleName("RegisterOrganizationForm");

		pack();
	}// </editor-fold>

	private void fullNameTextFieldActionPerformed(ActionEvent evt) {
		// TODO add your handling code here:
	}

	private void emailTextFieldActionPerformed(ActionEvent evt) {
		// TODO add your handling code here:
	}

	private void ogrnTextFieldActionPerformed(ActionEvent evt) {
		// TODO add your handling code here:
	}

	private void loginTextFieldActionPerformed(ActionEvent evt) {
		// TODO add your handling code here:
	}

	private void firstNameTextFieldActionPerformed(ActionEvent evt) {
		// TODO add your handling code here:
	}

	private void middleNameTextFieldActionPerformed(ActionEvent evt) {
		// TODO add your handling code here:
	}

	private void innTextFieldActionPerformed(ActionEvent evt) {
		// TODO add your handling code here:
	}

	private void checkOrgDataButtonActionPerformed(ActionEvent evt) {
		// TODO add your handling code here:
	}

	private void registerButtonActionPerformed(ActionEvent evt) {
		initializeInputData();
		DataBaseUtils.insertOrgAddress();
		orgAddressId = DataBaseUtils.getAddressId(DataBaseUtils.ZIP_CODE_REPLACEMENT);
		DataBaseUtils.insertOrganization(orgFullName, orgOgrn, orgInn, orgKpp, orgAddressId, 
				 orgPhone, orgWebsite, orgEmail);
		
	}

	private void initializeInputData() {
		orgFullName = fullNameTextField.getText();
		orgEmail = emailTextField.getText();
		orgKpp = kppTextField.getText();
		orgOgrn = ogrnTextField.getText();
		orgInn = innTextField.getText();
		orgPhone = phoneTextField.getText();
		orgWebsite = "www.test.com";		
		userLogin = loginTextField.getText();
		userFirstName = firstNameTextField.getText();
		userLastName = lastNameTextField.getText();
		userMiddleName = middleNameTextField.getText();
	}

	private void cancelButtonActionPerformed(ActionEvent evt) {
		// TODO add your handling code here:
	}

	private void clearFormButonActionPerformed(ActionEvent evt) {
		// TODO add your handling code here:
	}

	private void checkUserDataButtonActionPerformed(ActionEvent evt) {
		// TODO add your handling code here:
	}

	/**
	 * @param args
	 *            the command line arguments
	 */
	public static void main(String args[]) {
		/* Set the Nimbus look and feel */
		// <editor-fold defaultstate="collapsed"
		// desc=" Look and feel setting code (optional) ">
		/*
		 * If Nimbus (introduced in Java SE 6) is not available, stay with the
		 * default look and feel. For details see
		 * http://download.oracle.com/javase
		 * /tutorial/uiswing/lookandfeel/plaf.html
		 */
		try {
			UIManager.LookAndFeelInfo[] installedLookAndFeels = UIManager
					.getInstalledLookAndFeels();
			for (int idx = 0; idx < installedLookAndFeels.length; idx++)
				if ("Nimbus".equals(installedLookAndFeels[idx].getName())) {
					UIManager.setLookAndFeel(installedLookAndFeels[idx]
							.getClassName());
					break;
				}
		} catch (ClassNotFoundException ex) {
			java.util.logging.Logger.getLogger(
					EnterParametersGuiForm.class.getName()).log(
					java.util.logging.Level.SEVERE, null, ex);
		} catch (InstantiationException ex) {
			java.util.logging.Logger.getLogger(
					EnterParametersGuiForm.class.getName()).log(
					java.util.logging.Level.SEVERE, null, ex);
		} catch (IllegalAccessException ex) {
			java.util.logging.Logger.getLogger(
					EnterParametersGuiForm.class.getName()).log(
					java.util.logging.Level.SEVERE, null, ex);
		} catch (UnsupportedLookAndFeelException ex) {
			java.util.logging.Logger.getLogger(
					EnterParametersGuiForm.class.getName()).log(
					java.util.logging.Level.SEVERE, null, ex);
		}
		// </editor-fold>

		/* Create and display the form */
		java.awt.EventQueue.invokeLater(new Runnable() {
			public void run() {
				new EnterParametersGuiForm().setVisible(true);
			}
		});
	}

	// Variables declaration - do not modify
	private JButton cancelButton, checkOrgDataButton, checkUserDataButton,
			clearFormButon, registerButton;
	private JLabel emailLabel, firstNameLabel, fullNameLabel, innLabel,
			kppLabel, lastNameLabel, loginLabel, middleNameLabel, ogrnLabel,
			phoneLabel;

	private JTextField emailTextField, firstNameTextField, fullNameTextField,
			innTextField, kppTextField, lastNameTextField, loginTextField,
			middleNameTextField, ogrnTextField, phoneTextField;

	private JPanel userDataPanel, orgDataPanel;

	private static String orgFullName, orgOgrn, orgInn, orgKpp, orgEmail, orgAddressId, 
			orgPhone, orgWebsite, userLogin, userFirstName, userLastName, userMiddleName;
	private static DataBaseUtils db;
	private static Logger logger = Logger.getInstance();
	// End of variables declaration

}
